Skip to content

Conversation

@petercorke
Copy link
Collaborator

The problem in #144 is actually in getunit which returns a numpy array when passed a scalar. This is a more general problem that was picked up here.

The fix is simple. Tested by turning warnings on

% python -Wd
Python 3.10.16 (main, Dec 11 2024, 10:22:29) [Clang 14.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from spatialmath.base import angvec2r
>>> angvec2r(0.3, [1, 0, 0])
array([[ 1.        ,  0.        ,  0.        ],
       [ 0.        ,  0.95533649, -0.29552021],
       [ 0.        ,  0.29552021,  0.95533649]])
>>> 

@petercorke
Copy link
Collaborator Author

this needs more thought, this deprecation warning is everywhere in the code base...

@petercorke petercorke closed this Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant